package model.GsonMapping;

import java.util.List;

import DAO.DAOFactory;
import DAO.SessionDAO;

import common.Enums.ComponentType;
import common.Enums.DAOType;
import common.Enums.DateRange;
import common.Exceptions.DAOException;

import model.BusinessCase;

public class ReuseSearchData 
{
	private List<BusinessCase> businessCases;
	private String[] componentTypes;
	private String[] dateRange;
	private BusinessCase currentBC;
	
	public ReuseSearchData(int bcLimit) throws DAOException
	{
		businessCases = DAOFactory.getDAOFactory(DAOType.MYSQL).getBcDAO().getCountMostRecentlyEditedBcs(bcLimit);
		componentTypes = ComponentType.toStringArray();
		dateRange = DateRange.toStringArray();
		currentBC = SessionDAO.getInstance().getCachedBC();
	}
	
	public List<BusinessCase> getBusinessCases(){return businessCases;}
	public String[] getComponentTypes(){return componentTypes;}
	public String[] getdateRange(){return dateRange;}
	public BusinessCase getCurrentBC(){return currentBC;}
}
